package com.haircut.project.vo.config;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@Setter
@Getter
@ApiModel("ConfigVo")
public class ConfigVo {
    /**
     * id
     */
    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("文本")
    private String text;
    @ApiModelProperty("值")
    private String value ;
    /**
     * 项目名称
     */
    @ApiModelProperty("项目名称")
    @NotBlank(message = "项目名称不能为空")
    @Length(min = 1,max = 90,message = "项目名称范围[1~90]")
    private String projectName;
    /**
     * 项目金额
     */
    @ApiModelProperty("项目金额")
    @NotNull(message = "项目金额不能未空")
    @DecimalMin(value = "0.01",message = "项目金额不能小于0.01")
    @DecimalMax(value = "999999.99",message = "项目金额不能大于999999.99")
    private BigDecimal projectAmount;
    /**
     * 分成类型(1、比例 2、固定值)
     */
    @ApiModelProperty("分成类型(1、比例 2、固定值)")
    @Range(min = 1,max = 2,message = "分成类型范围[1~2]")
    private Integer shareType;
    /**
     * 技师分配比例
     */
    @ApiModelProperty("技师分配比例")
    @DecimalMin(value = "0.01",message = "技师分配比例不能小于0.01")
    @DecimalMax(value = "100.00",message = "技师分配比例不能大于100")
    private BigDecimal technicianRate;
    /**
     * 显示顺序
     */
    @ApiModelProperty("order_num")
    @Range(min = 0,max = 9999,message = "排序范围[0~9999]")
    private Integer orderNum;

    /**
     * 分类id
     */
    @ApiModelProperty("分类id")
    @NotBlank(message = "分类id不能为空")
    private String categoryId;
}
